package com.example.plugin.hook;

import android.util.Log;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * author: zhouyh
 * created on: 2/4/21 2:03 PM
 * description: PMS服务的动态代理
 */
public class IPackageManagerHook implements InvocationHandler {


    private static final String TAG = "PMSHookHandler";

    private Object base;

    public IPackageManagerHook(Object base) {
        this.base = base;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Log.i(TAG,"hey,you hook PMS");
        return method.invoke(base,args);
    }


}
